<?php

class View_Helper_WhereAmI extends Model3_View_Helper
{

    function path(array $parts)
    {
        ?>
        <ol class="breadcrumb">
            <?php foreach ($parts as $key => $path): ?>
                <li>
                    <?php if (is_string($path) === true): ?>
                        <a class="small" href="<?php echo $path; ?>">
                            <?php echo $key; ?>
                        </a>
                    <?php elseif (is_array($path) === true): ?>
                        <a class="small" href="<?php echo $this->_view->url($path); ?>">
                            <?php echo $key; ?>
                        </a>
                    <?php else: ?>
                        <?php echo $key; ?>
                    <?php endif; ?>
                </li>
            <?php endforeach; ?>
        </ol>
        <?php
    }

}